package com.zhehekeji.opsys.api.entity;

// Generated 2016-5-18 15:42:18 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TThemeProduct generated by hbm2java
 */
@Entity
@Table(name="t_theme_product")
public class TThemeProduct implements java.io.Serializable {

	/** 
	* @Fields serialVersionUID : TODO
	*/ 
	private static final long serialVersionUID = 1442299489907854729L;
	private Long id;
	private String productCode;
	private String productName;
	private Date createTime;
	private Integer status;
	private TTheme ttheme;
	private Long cpCode;

	public TThemeProduct() {
	}
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID",length=20,nullable=false,unique=true)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@Column(name="PRODUCT_CODE",length=64,nullable=true)
	public String getProductCode() {
		return this.productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}
	@Column(name="PRODUCT_NAME",length=128,nullable=true)
	public String getProductName() {
		return this.productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME")
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name="STATUS",length=2,nullable=true)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	@ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER,optional=true)
	@JoinColumn(name="THEME_ID")
	public TTheme getTtheme() {
		return ttheme;
	}
	public void setTtheme(TTheme ttheme) {
		this.ttheme = ttheme;
	}
	@Column(name="CP_CODE",length=20,nullable=true)
	public Long getCpCode() {
		return this.cpCode;
	}
	public void setCpCode(Long cpCode) {
		this.cpCode = cpCode;
	}

}
